package cn.sxt.config;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/4/24 11:56
 */

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
@Configuration
public class RestTemplateConfig {
    @Bean
    @LoadBalanced //启用负载均衡
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
